import { setStorage, getStorage } from '@/utils/auth'
export interface LanguageType {
  language?: string
}

const state: LanguageType = {
  language: getStorage('Language') || 'zh_CN'
}

const mutations = {
  SET_LANGUAGE: (state: LanguageType, language: string) => {
    state.language = language
    setStorage('Language', language)
  }
}

export default {
  namespaced: true,
  state,
  mutations
}
